home *** CD-ROM | disk | FTP | other *** search
/ How Many Bugs in a Box / How Many Bugs in a Box.cdr / bugs / submenu / 00341.ls < prev    next >
Encoding:
Text File  |  1995-03-29  |  1.1 KB  |  38 lines

  1. on changevolume
  2.   global mysoundlevel, volleft, volright, volrange
  3.   puppetSound("bees5")
  4.   set rumpus to the castNum of sprite 41
  5.   set spritehor to the mouseH
  6.   repeat while the mouseDown
  7.     set getmouse to the mouseH
  8.     if (getmouse >= volleft) and (getmouse <= volright) then
  9.       set spritehor to getmouse
  10.     else
  11.       if getmouse < volleft then
  12.         set spritehor to volleft
  13.       else
  14.         set spritehor to volright
  15.       end if
  16.     end if
  17.     set the locH of sprite 41 to spritehor
  18.     set the castNum of sprite 41 to rumpus + random(2) - 1
  19.     set mysoundlevel to 7.0 * (spritehor - volleft) / volrange
  20.     updateStage()
  21.   end repeat
  22.   set mysoundlevel to 7.0 * (spritehor - volleft) / volrange
  23.   set the castNum of sprite 41 to rumpus
  24.   set the soundLevel to mysoundlevel
  25.   puppetSound("bing")
  26.   updateStage()
  27. end
  28.  
  29. on setupvolume
  30.   global mysoundlevel, volleft, volright, volrange
  31.   puppetSprite(41, 1)
  32.   set volleft to the left of sprite 39
  33.   set volright to the right of sprite 39
  34.   set volrange to volright - volleft
  35.   set the locH of sprite 41 to volleft + (mysoundlevel * volrange / 7.0)
  36.   updateStage()
  37. end
  38.